OS/VS COBOL accepted the EXHIBIT
statement, but IBM Enterprise COBOL does not. With IBM Enterprise COBOL, the DISPLAY
statement must be used instead.
Noncompliant code example
IDENTIFICATION DIVISION.
PROGRAM-ID. foo.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-FOO PIC X(42).
01 WS-BAR PIC X(42).
PROCEDURE DIVISION.
* Non-Compliant
EXHIBIT NAMED WS-FOO WS-BAR.
END PROGRAM foo.
Compliant solution
IDENTIFICATION DIVISION.
PROGRAM-ID. foo.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-FOO PIC X(42).
01 WS-BAR PIC X(42).
PROCEDURE DIVISION.
* Compliant
DISPLAY "WS-FOO = " WS-FOO
"WS-BAR = " WS-BAR.
END PROGRAM foo.